#ifndef MESSAGE_QUEUE_H
#define MESSAGE_QUEUE_H 1

#include <queue>
#include <pthread.h>

struct Message
{
	int com_port;
	char message[1024];
};

class MessageQueue
{
private:
	pthread_mutex_t mutex;
	pthread_cond_t count_nonzero;
	std::queue<Message> message_queue;

public:
	MessageQueue();
	~MessageQueue();
	
	void push_message(struct Message message);
	struct Message pop_message();
};

#endif